home *** CD-ROM | disk | FTP | other *** search
- /* (C) Copyright 1991 Dave Fritsche (wb8zxu), All Rights Reserved.
- *
- * Redistribution and use in source and binary forms are permitted for
- * non-commercial use, provided that the above copyright notice and this
- * paragraph are duplicated in all such forms. THIS SOFTWARE IS PROVIDED
- * ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
- #include <stdio.h>
- #include "screen.h"
-
- unsigned int
- screen()
- {
- unsigned int m, n, key, not_done;
-
- not_done = 1;
- n = 0;
-
- for (m = 0; m < nfields; m++)
- {
- puttxt(tx[m], ty[m], TSA, TFA, title[m]);
- puttxt(ix[m], iy[m], ISA, IFA, ifd[m]);
- }
-
- while ( not_done )
- {
- key = field( tx[n], ty[n], tsa[n], tfa[n], title[n],
- ix[n], iy[n], isa[n], ifa[n], iif[n],
- ift[n], ifd[n], rmask[n] );
- switch(key)
- {
- case UP:
- n = up[n] - 1;
- break;
- case DOWN:
- case CR:
- n = dn[n] - 1;
- break;
- case LEFT:
- n = l[n] - 1;
- break;
- case RIGHT:
- n = r[n] - 1;
- break;
- case ESC:
- clrscr();
- exit(0);
- case F1:
- return(0);
- break;
- default:
- not_done = 0;
- break;
- }
- }
- return(key);
- }
-